<?php
class View_Solution{
	public static function viewSolution($arrSolution, $curUrl, $idUser){
		$objSession = User_Session::instance();
		$idSolution = $arrSolution['ID_solution'];
		echo '<br /><h4>Готовое решение: <a href="' . $curUrl . '">' . $arrSolution['name'] . '</a></h4><br />
			  <div class="creationInfo">
			    <img class="calendar" src="' .  W_IMAGES . 'icons/calendar.gif"/>
				<span class="time">' . Service_Date::getCaseDateForUser($arrSolution['creation']) . '</span>
				<img class="user" src="' . W_IMAGES . 'icons/user.gif"/>
			    <span class="user"><a href="' . W_ABSPATH . 'user/' .  $arrSolution['login'] . '/" class="red">' . $arrSolution['last_name'] . ' ' . $arrSolution['first_name'] . '</a></span>
			  </div>
			  <div class="tags">
				<img class="folder" src="' . W_IMAGES . 'icons/folder.gif"/>
				<span class="tags">' . View_Tags::showTags(split(',', $arrSolution['tags']), $arrSolution['ID_solution'], 10, 'blue', W_ABSPATH, ' ') . '</span>
			  </div>
			  <br />
			    <form method="POST">';
				if ($objSession->isLoggedIn() && $idUser == $arrSolution['ID_user'])
					echo '<a href="' . W_ABSPATH . 'solution/' . $idSolution . '/edit"> <img src="' . W_ABSPATH . 'content/images/icons/news/editNews.gif" style="position: relative; bottom: 3px;"> </a>';
				if ($objSession->isLoggedIn() && $idUser == $arrSolution['ID_user'])
					echo '<input type="image" onclick="return confirm(\'Вы действительно хотите удалить готовое решение?\')" name="deleteSolution" src="' . W_ABSPATH . 'content/images/icons/news/deleteNews.gif" value="удалить"/>';
				echo '<input type="hidden" name="idSolution" value="' . $idSolution . '" />
			  </form>
			  <br />Краткое описание: ' . $arrSolution['concise_description'] . '
			  <br />Полное описание: ' . $arrSolution['complete_description'] . '
			  <br /><div class="stars"></div>';
			  if ($arrSolution['file_name'] != ''){
				  echo '<br /><a href="' . W_ABSPATH . $arrSolution['file_path'] . '">' . $arrSolution['file_name'] . '(' . $arrSolution['file_type'] . '  ' .
				  self::viewFileSize($arrSolution['file_size']) . ')</a><br />';
			  }


/*		echo '<br />Название :' . $arrSolution['name'] .
		'<br />Автор :' . User_User::getUserNameById($arrSolution['ID_user']) .
		'<br />Добавлен :' . Service_Date::getCaseDateForUser($arrSolution['creation']) .
		'<br /><div class="stars"></div>' .
		'<br /><a href="' . W_ABSPATH . $arrSolution['file_path'] . '">' . $arrSolution['file_name'] . '(' . $arrSolution['file_type'] . '  ' .
		self::viewFileSize($arrSolution['file_size']) . 'КБ)</a><br />';*/
	}
	/**
	 * Enter description here...
	 *
	 * @param int $size - размер в байтах
	 */
	public static function viewFileSize($size){
		//if (!is_numeric($size) && is_string($size))
        if ($size >= 1073741824) {$size = round($size / 1073741824 * 100) / 100 . " Gb";}
        elseif ($size >= 1048576) {$size = round($size / 1048576 * 100) / 100 . " Mb";}
        elseif ($size >= 1024) {$size = round($size / 1024 * 100) / 100 . " Kb";}
        else {$size = $size . " b";}
		return $size;
	}

	public static function viewSolutionTreeStructure($arrLangFolder){
		foreach ($arrLangFolder as $arLangFolder){
			echo '<li><span class="folder">' . $arLangFolder['folder_name'] . '</span>';
			$arrSolutionsNameForCurFolder = isset($arLangFolder['array_category']) ? $arLangFolder['array_category'] : NULL; //
			if ($arrSolutionsNameForCurFolder != NULL){
				echo '<ul>';
	/*			echo '<pre>';
				print_r($arLangFolder);
				echo '</pre>';*/
				foreach ($arrSolutionsNameForCurFolder as $arSolutionsNameForCurFolder){
					$url = W_ABSPATH . 'solutionList/' . $arLangFolder['ID_folder'] . '/' . $arSolutionsNameForCurFolder['ID_category'] . '#solutions';
					echo '<li><span class="file"><a href="' . $url . '">' . $arSolutionsNameForCurFolder['name'] . '</a></span></li>'; // <input type="radio" value="0" name="approved[]"/> //
				}
				if (isset($arLangFolder['children'])){
					View_Solution::viewSolutionTreeStructure($arLangFolder['children']);
					echo '</ul>';
				}
				else {
					echo '</ul>';
				}
			}
			elseif (isset($arLangFolder['children'])){
				echo '<ul>';
				View_Solution::viewSolutionTreeStructure($arLangFolder['children']);
				echo '</ul>';
			}
		}
	}

	public static function viewSolutionList($arrLangFolder){
		echo '<div id="main">';
		echo ' 	<ul id="browser" class="filetree">';
		View_Solution::viewSolutionTreeStructure($arrLangFolder);
		echo '
				</ul>
			  </div>';
	}

	public static function viewSolutionsList($arrSolutions, $idUser){
		$objSession = User_Session::instance();
		echo '<a name="solutions"></a>';
		foreach ($arrSolutions as $arrSolution){
			$idSolution = $arrSolution['ID_solution'];
			$curUrl = W_ABSPATH . 'solution/' . $idSolution;
			echo '<br /><h4>Готовое решение: <a href="' . $curUrl . '">' . $arrSolution['name'] . '</a></h4><br />
				  <div class="creationInfo">
				    <img class="calendar" src="' .  W_IMAGES . 'icons/calendar.gif"/>
					<span class="time">' . Service_Date::getCaseDateForUser($arrSolution['creation']) . '</span>
					<img class="user" src="' . W_IMAGES . 'icons/user.gif"/>
				    <span class="user"><a href="' . W_ABSPATH . 'user/' .  $arrSolution['login'] . '/" class="red"></a></span>
				  </div>
				  <div class="tags">
					<img class="folder" src="' . W_IMAGES . 'icons/folder.gif"/>
					<span class="tags">' . View_Tags::showTags(split(',', $arrSolution['tags']), $arrSolution['ID_solution'],10, 'blue', W_ABSPATH, ' ') . '</span>
				  </div>
				  <br />
				    <form method="POST" >';
					if ($objSession->isLoggedIn() && $idUser == $arrSolution['ID_user'])
						echo '<a href="' . W_ABSPATH . 'solution/' . $idSolution . '/edit"> <img src="' . W_ABSPATH . 'content/images/icons/news/editNews.gif" style="position: relative; bottom: 3px;"> </a>';
					if ($objSession->isLoggedIn() && $idUser == $arrSolution['ID_user'])
						echo '<input type="image" onclick="return confirm(\'Вы действительно хотите удалить готовое решение?\')" name="deleteSolution" src="' . W_ABSPATH . 'content/images/icons/news/deleteNews.gif" value="удалить"/>';
					echo '<input type="hidden" name="idSolution" value="' . $idSolution . '" />
				  </form>
				  <br />Краткое описание: ' . $arrSolution['concise_description'];
					View_Mark::showMark('solution', $arrSolution, 0, 'stars', true);
				  if ($arrSolution['file_name'] != ''){
					  echo '<br /><a href="' . W_ABSPATH . $arrSolution['file_path'] . '">' . $arrSolution['file_name'] . '(' . $arrSolution['file_type'] . '  ' .
					  self::viewFileSize($arrSolution['file_size']) . ')</a>';
				  }
				  echo '<br />
				  <div class="delimitersSolutionsList"></div>';
		}
	}

/**
   * Вывод списка готовых решений
   *
   * @param array $arrSolutions
   * @param int $idFolder - идентификатор раздела
   * @param int $chapterDescription - описание раздела
   * @param bool $isLastChapter - является ли текущий разделы "нижним" в структуре
   * @param int $numberOfPages - количество страниц
   * @param int $pageNum - номер страницы
   */
  public static function showSolutionList(array $arrSolutions, $isLastChapter, $numberOfPages = 1, $pageNum = 1, $arrUrls = array(), $arrSort = array(), $isForProfile = false, $idFolder = NULL) {
    echo '<div class="item">';
    if (!$isForProfile){
	      View_TreeStructure::viewBreadcrumbs($arrUrls); //выводим текущий путь
	      self::showFilter($arrSort, $idFolder);
	      if (empty($arrSolutions)) {
	        echo '<div class="no_essences_notice">
		  					<p>Готовых решений пока что нет.</p>
		    	<p>Вы можете <a href="' . W_ABSPATH . 'solution/add?idFolder=' . $idFolder . '">добавить готовое решение</a><a href="' . W_ABSPATH . 'solution/add"><img class="arrowRight" src="' . W_IMAGES . 'arrowRight.gif" /></a></p>
		    	</div>';
	        echo '</div>'; // закрываем div.item, так как выходим из функции
	        return false;
	      }
    }

      echo '<div class="list_toggling solution">
              <table>
                <tr class="bg_grey">
                  <th></th>
                  <th>Решение</th>
                  <th class="td_number"><img alt="" src="' . W_IMAGES . 'icons/img_qwestion_1.gif" height="14" width="16" title="Рейтинг" /></th>
                  <th class="td_number"><img alt="" src="' . W_IMAGES . 'icons/img_qwestion_2.gif" title="Количество комментариев" /></th>
                  <th class="td_number"><img alt="" src="' . W_IMAGES . 'icons/img_solution_1.gif" title="Количество скачиваний" /></th>'
                  //<th><img style="margin-right: 3px;" alt="" src="' . W_IMAGES . 'icons/img_qwestion_4.gif" title="Опубликовано" /></th>
                .'</tr>';

        foreach ($arrSolutions as $arrSolution) {
             echo '
           <tr idSolution="' . $arrSolution['ID_solution'] . '">
              <td class="fist_colum_icon"><img src="' . W_IMAGES . 'background/min_solution.png" alt=""></td>
							<td>';
										echo View_UniversalInference::getSolution($arrSolution, false);
									  echo '
									       <ul class="xtra-info">
									          <li class="date">' . Service_Date::getCaseDateForUser($arrSolution['creation']) . '</li>
									          <li class="user">
									            <a class="green" href="' . W_ABSPATH . 'user/' . $arrSolution['login'] . '">' . $arrSolution['login'] . '</a>
									          </li>
									        </ul>
								          ' . View_Tags::showTagsInList($arrSolution['tags'], 10, 'all_tags');
				 echo '
  				 		</td>' .
  				 	 '<td nowrap="nowrap" class="td_number">
  				 			<strong ' . ($arrSolution['total_mark'] < 0 ? 'class="red"' : '') . '>' . round($arrSolution['total_mark'], 2) . '</strong>
  				 		</td>
           		<td class="td_number">
           			<strong>' . $arrSolution['comment_amount'] . '</strong>
           		</td>
           		<td class="td_number">
           			<strong>' . $arrSolution['downloading_amount'] . '</strong>
           		</td>';
        }
      echo '  </table>
            </div>';
    echo '</div>';
  }

	 /** Функция формирует категорию в тег option
	 *
	 * @param array $arrFolder - массив с именем и id категории
	 * @param int $idFolder - id папки, которую нужно выделить
	 * @param int $whitespace - кол-во пробелов перед ребёнком предыдущей категории
	 */
	private static function viewOptionForSelectFolder($arrFolder, $idFolder, $whitespace){
		$selected = '';
		$space = '';
		if ($arrFolder['ID_folder'] == $idFolder)
			$selected = 'selected';
		for ($i = 0; $i < $whitespace; $i++){
			$space .= '&nbsp;';
		}
		echo '<option ' . $selected . ' value="' . $arrFolder['ID_folder'] . '"> ' . $space . $arrFolder['name'] . '</option>';
	}

	private static function folderForeach($arrFolder, $idFolder = NULL, $whitespace = NULL){
		foreach ($arrFolder as $arFolder){
//			if ($arFolder['language_amount'] != 0) // убираем пустые папки
				self::viewOptionForSelectFolder($arFolder, $idFolder, $whitespace);
			if (isset($arFolder['children']))
				self::folderForeach($arFolder['children'], $idFolder, $whitespace + 2);
		}
	}
	/**
	 * Функцию вывода на экран сформированной структуры категорий
	 *
	 * @param array $arrFolders - массив с древовидными папками и их количеством
	 * @param array $arrCategoryForCurFolder - массив с языками для конкретной папки, которую нужно выделить
	 */
	public static function viewFoldersStructure($arrFolders, $arrCategoryForCurFolder = array()){
		//$arrFolders = self::getAllLanguageFolder();
		$arrFolder = $arrFolders['arr_folder'];
		//self::hideEmptyFolder($arFolder);
		//echo '<pre>';
		//print_r($arrFolders);
		//print_r($arrCategoryForCurFolder);
		//echo '</pre>';
/*		foreach ($arrFolder as $arFolder){
			if ($arFolder['language_amount'] == 0)
				$arrFolders['folder_size'] = $arrFolders['folder_size'] - 1; // корректировка размера для selectа если есть пустые папки
		}*/
		$selected = '';
		if (sizeof($arrCategoryForCurFolder) == 0)
			$selected = 'selected';
		echo '<select id="folder_category" name="folder" onchange="showSel(this.form);"
		size="' . ($arrFolders['folder_size'] + 2) . '">
		<option value="0" ' . $selected . '>Выберите категорию</option>';
		$selected = '';
		self::folderForeach($arrFolder, $arrCategoryForCurFolder['ID_folder']);
		if (sizeof($arrCategoryForCurFolder) > 0){
			//$arrCategoryForCurFolder = Code::getLanguageForFolder($idFolder, $selectedLang);
			$options = $arrCategoryForCurFolder['options'];
			$size = $arrCategoryForCurFolder['size'] + 1;
			$style = '';
		}
		else {
			$size = 2;
			$options = '';
			$style = ' style="display:none"; ';
		}
		echo '</select><select id="category" name="category" size="' . $size . '"' . $style . '>' . $options . '</select>';
	}

  /**
   * Вывод блока с фильтром
   *
   */
  private static function showFilter($arrSort, $idFolder) {
    $objSession = User_Session::instance();
    echo '<div class="all_article list_solution">';
    $html = '<div class="filter-simple list_solution" style="display: ' . ($arrSort['solutionFilter'] ? 'block' : 'none') . ';">
				  <form action="' . W_ABSPATH . 'solutions" method="GET" id="smallFilter">
     				    <table class="filterTable" border="0" cellspacing="0" cellpadding="0">
     				      <!--<tr>
     				        <th colspan="4">Фильтр</th>
     				      </tr>-->
     				      <!--<tr>
     				        <td class="col_1">Создано после</td>
     				        <td class="col_2">
     				        	<input class="datePicker" type="text" name="startDate" id="startDate" value="' . (!empty($arrSort['startDate']) ? $arrSort['startDate'] : '') . '" />
     				        	&nbsp;<input id="tagsBtn" type="image" style="margin-top:2px;" name="filterSmall" src="' . W_IMAGES . 'button/btn_filter.gif" style="margin:0" />
     				        	<input type="hidden" name="fullFilter" />
     				         </td>
     				        <td class="col_3">Рейтингом более</td>
     				        <td class="col_4">
     				        	<input class="datePicker" type="text" size="1" id="rating" name="rating" value="' . (!empty($arrSort['rating']) ? $arrSort['rating'] : '') . '" />
     				        	<input id="tagsBtn" type="image" style="margin-top:2px;" name="filterSmall" src="' . W_IMAGES . 'button/btn_filter.gif" style="margin:0" />
     				          <input type="hidden" name="fullFilter" />
     				        </td>
     				      </tr> -->
     				      <tr>
     				        <td class="col_1">Теги</td>
     				        <td class="col_2" colspan="3">
     				          <input class="stFilterInput" type="text" id="tags" name="tags" value="' . (isset($arrSort['tags']) ? $arrSort['tags'] : '') . '" />
     				          <input id="tagsBtn" type="image" style="margin-top:2px;" name="filterSmall" src="' . W_IMAGES . 'button/btn_filter.gif" style="margin:0" />
     				          <input type="hidden" name="fullFilter" />
     				        </td>
     				      </tr>
     				     <tr>
     				       <td class="sbmt_left" colspan="4">
     				         <a id="showSorting" onClick="solution.listView.filter.toggleFilter(this);return false;" href="#" style="margin-left:40px">Расширенная фильтрация и сортировка</a>
     				       </td>
     				     </tr>
     				    </table>
     				  </form>
      		  </div>';

    $html .= '  <div class="filter list_solution" style="display: ' . (!$arrSort['solutionFilter'] ? 'block' : 'none') . ';">
     				  <form action="' . W_ABSPATH . 'solutions" method="GET" id="fullFilter">
     				    <table class="filterTable" border="0" cellspacing="0" cellpadding="0">
     				     <tr>
     				       <th colspan="4">Фильтр</th>
     				     </tr>
     				     <tr>
     				       <td class="col_1">Создано после</td>
     				       <td class="col_2"><input class="datePicker" type="text" name="startDate" id="startDate" value="' . (!empty($arrSort['startDate']) ? $arrSort['startDate'] : '') . '" /></td>
     				       <td class="col_3">Рейтингом более</td>
     				       <td class="col_4"><input class="datePicker" type="text" size="1" id="rating" name="rating" value="' . (!empty($arrSort['rating']) ? $arrSort['rating'] : '') . '" /></td>
     				     </tr>
     				     <tr>
     				       <td class="col_1">до</td>
     				       <td class="col_2" colspan="3">
     				         <input class="datePicker" type="text" name="endDate" id="endDate" value="' . (!empty($arrSort['startDate']) ? $arrSort['endDate'] : NULL) . '"/>
     				         <p class="duration" style="display: block;"><a class="jsHref" onclick="solution.listView.filter.setDay();">День</a>&nbsp;&nbsp;<a class="jsHref" onclick="solution.listView.filter.setWeek();">Неделя</a>&nbsp;&nbsp;<a class="jsHref" onclick="solution.listView.filter.setMonth();">Месяц</a>&nbsp;&nbsp;<a class="jsHref" onclick="solution.listView.filter.setYear();">Год</a></p>
     				       </td>
     				       <!--<td class="col_3">Сложностью менее</td>
     				       <td class="col_4"><input class="datePicker type="text" size="1" id="complexity" name="complexity" value="' . (!empty($arrSort['complexity']) ? $arrSort['complexity'] : '') . '"/>
     				       </td>-->
     				     </tr>
     				     <tr>
     				       <td class="col_1" style="padding-top: 7px;">Укажите теги</th>
     				       <td class="col_2" colspan="3"><input class="stFilterInput" type="text" id="tags" name="tags" value="' . (isset($arrSort['tags']) ? $arrSort['tags'] : '') . '" /></th>
     				     </tr>
     				     <tr>
     				       <th colspan="4" style="padding-top: 15px;">Сортировка</th>
     				     </tr>
     				     <tr>
     				       <td class="col_1" style="padding-top: 7px;">Выберите поле</th>
     				       <td class="col_2">
                     <select id="sort" name="sort">
							  		 	 <option value="1" ' . ($arrSort['sort'] == 1 ? 'selected="selected"' : NULL) . '>Дата</option>
							  			 <option value="2" ' . ($arrSort['sort'] == 2 ? 'selected="selected"' : NULL) . '>Рейтинг</option>
							  			 <option value="3" ' . ($arrSort['sort'] == 3 ? 'selected="selected"' : NULL) . '>Количество скачиваний</option>
							  			 <option value="4" ' . ($arrSort['sort'] == 4 ? 'selected="selected"' : NULL) . '>Количесво комментариев</option>
							  			 <option value="5" ' . ($arrSort['sort'] == 5 ? 'selected="selected"' : NULL) . '>Количество просмотров</option>
							  			 <option value="6" ' . ($arrSort['sort'] == 6 ? 'selected="selected"' : NULL) . '>Количество посетителей</option>
							  		 </select>
     				       </td>
     				       <td class="col_3" colspan="2" style="padding-right:7px;padding-left:10px;">
       				       <label for="direction_1" style="padding-top:0px; padding-right:0px;">&nbsp;прямой порядок</label>
       				       <input type="radio" name="direction" id="direction_1" value="1" style="position:relative;left:1px"  ' . ($arrSort['direction'] != 2 ? 'checked' : NULL) . '><br />
       				       <label for="direction_2" style="padding-top:0px; padding-right:0px;">&nbsp;обратный порядок</label>
  						  		 <input type="radio" name="direction" id="direction_2" value="2" ' . ($arrSort['direction'] == 2 ? 'checked' : NULL) . '>
     				       </td>
     				     </tr>
     				     <tr>
     				       <td colspan="4" style="font-size:1px;height:5px;"></th>
     				     </tr>
     				     <tr>
     				       <td class="sbmt_left" colspan="2">
     				         <input id="tagsBtn" type="image" name="filterBig" src="' . W_IMAGES . 'button/btn_filter.gif" style="margin:0" />
     				         <input type="hidden" name="fullFilter" />
     				       </td>
     				       <td class="sbmt_right" colspan="2">
     				         <a id="showSorting" onClick="solution.listView.filter.toggleFilter(this);return false;" href="#">Обычный фильтр</a>
     				       </td>
     				     </tr>
     				    </table>
     				  </form>
      			</div>';
		View_Common::showRoundedBox($html, 'width: 460px;margin-top:12px;height:auto;');
	  echo '    			</div>';



  }

public static function showSolution($arrSolution, $curUrl, $idUser, $arrUrls){
echo '
		<div class="main_article">
			<div class="item_text_info">
				<div class="text_info_left">
					<div class="text_info_right">';
View_TreeStructure::viewBreadcrumbs($arrUrls);
echo '
						<div class="item">

							<div class="top_info_text">
								<ul class="rating">
									<li class="one">' . round($arrSolution['total_mark'], 2) . '</li>
									<li class="second">' . round($arrSolution['average_complexity_mark'], 2) . '</li>
									<li class="coments"><a href="' . W_ABSPATH . 'solution/' .  $arrSolution['ID_solution'] . '#comment">' .  $arrSolution['comment_amount'] . '</a></li>
								</ul>
								<div class="right_ifno_text">
									<ul class="info_coments">
										<li class="date">' . Service_Date::getCaseDateForUser($arrSolution['creation']) . '</li>
										<li class="user"><a href="' . W_ABSPATH . 'user/' .  $arrSolution['login'] . '/">' . $arrSolution['login'] . '</a></li>';
										if($arrSolution['my'] == 0 and isset($arrSolution['author_name']) and isset($arrSolution['url'])){
										echo '<li class="solution_author"><strong>Автор: </strong><a target="_blank"';  if ($arrSolution['url']) echo 'href="' . $arrSolution['url'] . '"'; echo '>' . $arrSolution['author_name'] . '</a></li>';
										}
									echo '</ul>
										' . View_Tags::showTagsInList($arrSolution['tags'], 10, 'all_tags') . '
								</div>
								<div class="floatRight"><a class="none readerHref" href="javascript:reader.activateReadar();"><img alt="Режим чтения" title="Режим чтения" src="' . W_IMAGES . 'icons/kghostview.png"/></a></div>
							</div>
							<div class="article_text wysiwyg-content">
							' . $arrSolution['concise_description'] . '
							<br /><br />'
							. $arrSolution['complete_description'] . '
							</div>';
							if ($arrSolution['file_name'] != ''){
				  			echo '<br /><strong><a href="' . W_ABSPATH . 'solution/getFile/' . $arrSolution['ID_solution'] . '">Скачать</a></strong> (' . self::viewFileSize($arrSolution['file_size']) . ') ';
			  			}
							echo '<div id="social">';
								echo '<div class="service">';
									echo '<script src="' . W_JS . 'bookmarks.js" type="text/javascript"></script>';
								echo '</div>';
								echo '<div class="service" id="vkshare">';
									//echo '<script type="text/javascript" src="' . W_JS . 'share.js?10" charset="windows-1251"></script>';
									//echo '<script type="text/javascript">document.write(VK.Share.button(false,{type: "round", text: "Сохранить"}));</script>';
								echo '</div>';
								echo '<div class="service">';
									echo '<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>';
								echo '</div>';
								//echo '<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>';
								echo '<div class="service">';
									echo '<iframe src="http://www.facebook.com/plugins/like.php?href=' . trim(W_FULLPATH, '/') . $_SERVER['REQUEST_URI'] . '&layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:20px; " allowTransparency="true"></iframe>';
								echo '</div>';
								echo '<div style="clear:both;"></div>';
							echo '</div>';
							echo '<ul class="bottom_ocenku">
								<li><strong>Сложность:</strong><div class="slognost">'; echo View_Mark::showMark(10, $arrSolution, 1, 'complexity', false, false); echo '</div></li>
								<li><strong>Качество:</strong><div class="kachestvo">'; echo View_Mark::showMark(10, $arrSolution, 0, 'stars'); echo '</div></li>
							</ul>' .
					  	View_Tags::showTags(split(',', $arrSolution['tags']), $arrSolution['ID_solution'], 10, '', W_ABSPATH, ', ', $arrSolution['userDeletedTagsInfo']) . '
						</div>
					</div>
				</div>
			</div>
		</div>';
}

}
?>